moddbfandomcom-20200213-history
FreeBASIC
General Information FreeBASIC is a free, 32-bit BASIC compiler for Windows (32-bit), protected-mode MS-DOS, and Linux (x86). It began as an attempt to create a code-compatible, free alternative to Microsoft QuickBASIC, but has quickly grown into a powerful development tool, already including support for libraries such as Allegro, SDL, OpenGL, and many others with its default installation. Aside from having a syntax nearly 100% compatible with QuickBASIC, FreeBASIC introduces several new features to the aged language, including pointers to variables and functions, and unsigned data types. FreeBASIC is not a completely new BASIC dialect. It was designed to be compatible with QuickBASIC code, and therefore would not require you to learn anything new if you are already familiar with any Microsoft BASIC variant. FreeBASIC doesn't use case-sensitive names for any symbols, meaning that "var" equates to the same expression as "vAr" or "VAR". Also, scalar variables don't need to be dimensioned or declared, which implies that you can simply write a program without needing to declare the variables beforehand. For people who are insecure with that idea, the OPTION EXPLICIT command from Visual Basic is included, which allows you to turn off this feature. FreeBASIC supports older legacy features of the BASIC language, such as line numbers, as well as the more modern QuickBASIC style. Unlike many languages, it doesn't require a main function to be explicitly declared; the beginning of the file is where execution starts. Only a small number of keywords were added, and all functions are implemented as library functions. There are few new intrinsic routines, so there are no name conflicts with older programs. Because of this design feature, a huge variety of libraries can be offered with the main installation. Every week, new API's are ported to FreeBASIC, and any API with C bindings is capable of being ported simply by porting the headers. FreeBASIC can compile source files up to 2 GB long. The number of symbols (variables, constants, et cetera) is only limited by the memory available (you can include/use for example OpenGL, SDL, BASS, and the Windows API in your application). While FreeBASIC isn't an optimizing compiler, it does many kinds of optimizations to generate the fastest possible code on x86 CPU's, not losing to other BASIC alternatives, including the commercial ones. All third-party tools are also free; no piece of abandoned or copyrighted software is used. The assembler, linker, archiver and other command-line tools came from the MinGW32 project (the GCC port for Windows). Compiler is written in 100% in FB (that's it - FreeBASIC compiles itself), and as all modules are independent, porting to other OS's on the x86 platform won't be too difficult a task. As all tools used also exist on other OS's and can even create cross-platform executables, that will make the porting to other computing platforms easier, as well. How to get FreeBASIC You can always download the latest version of FreeBASIC from http://www.freebasic.net/ http://www.sourceforge.net/projects/fbc A much better option for people who aren't familiar with BASIC is to download a package including both the compiler and an Integrated Development Environment(IDE), which will let you get started with the least amount of hassle. Such a package, including the Excellent fbIDE by Vongodric, is available at http://fbide.sourceforge.net. FreeBASIC Resources on GPWIKI Getting Started with FreeBASIC Using FMOD, SDL, and tinyPTC in FreeBASIC Porting QuickBASIC programs to FreeBASIC Links to FreeBASIC resources FreeBASIC wiki is the largest repository of information about FreeBASIC on the internet. Qbasicnews.com has the largest community of FreeBASIC users on the internet. Category:FreeBASIC